<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位布局</title>
    <link rel="stylesheet" href="../day06/common.css">
    <style>
        .box1 {
            width: 100%;
            height: 60px;
            position: sticky;
            background-color: #333;
            text-align: center;
            color: #fff;
            font-size: 28px;
            line-height: 60px;
        }
    </style>
</head>

<body>

    <div class="box1">top</div>
    <div style="height: 2000px;position: relative;top: 60px;">
        <p>hello</p>
        <p>hello</p>
        <p>hello</p>
        <p>hello</p>
        <p>hello</p>
    </div>
</body>

</html>